<%@ page language="java" pageEncoding="utf8"%>
<jsp:include page="/head.jsp" />
<script type="text/javascript">
		dojo.require("dijit.form.ValidationTextBox");
		
		var errorCode = <%=request.getParameter("error")%>;
		
		
		 function submitForm() {
		  	//showErrorMessage('用户名或密码错误');
			return true;
   	 	}
    	
		function showErrorMessage(m) {
		
		if(dojo.isIE == 6){
			dojo.byId('errorDiv').style.visibility = 'visible';
		}else{
			dojo.byId('errorDiv').style.display = 'block';			
		}
        dojo.byId("error").innerHTML=m;
		dojo.byId("error").focus();
    }
    
    dojo.addOnLoad(function(){
    	if(errorCode == 1){
			showErrorMessage('用户名或密码错误');
		}
    });
</script>

<div class="maincontent">
	<div class="HackBox"></div>
	<div id="breadcrumb">
		&nbsp;
		<a href="Home.htm">主页</a>&gt;登陆
	</div>
	<div class="maincontentin">
		<div class="loginIcons">
			<img src="images/login.gif"></img>
			<a class="registerIcon" href="register.jsp">我要注册</a>
		</div>
		<div class="userLoginDiv">
			<div id="userLoginFormTop"></div>
			<form name="userLoginForm" id="userLoginForm" class="userLoginForm"
				action="userLogin.do" onsubmit='return submitForm()' method="post" >
				<table>
					<tr>
						<td colspan="3">
							<div id='errorDiv' class="error-msg" style="display: none">
								<span class="error-msg-icon">Error icon</span>
								<span tabindex="0" id='error'>用户名或密码错误</span>
								<span class="error-msg-r"></span>
								<div class="clear"></div>
							</div>
						</td>
					</tr>
					<tr>
						<td width="25%" class="loginLabel">
							用户名：
						</td>
						<td width="55%">
							<input name="username" invalidMessage="用户名或者email地址"
								required="true" id="email"
								dojoType="dijit.form.ValidationTextBox" />
						</td>
					</tr>
					<tr>
						<td width="20%" class="loginLabel">
							密&nbsp;&nbsp;&nbsp;&nbsp;码：
						</td>
						<td>
							<input name="userpassword" type="password" id="userpassword"
								required="true" invalidMessage="密码不能为空"
								dojoType="dijit.form.ValidationTextBox" />
						</td>
						<td width="20%">
							<a href="lostPassword.jsp">忘记密码？</a>
						</td>
					</tr>
					<tr>
						<td>
						</td>
					</tr>

					<tr>
						<td colspan="3">
							<div class="buttonbar"> 
								<div class="btngroup">
									<span class="blue-btn"> <span class="inputbtn"> <span
											class="l"></span> <input type="submit" value='登    陆'></input>
									</span> </span>
								</div>
							</div>
						</td>
					</tr>

				</table>
			</form>
			<div id="userLoginFormButtom"></div>
		</div>
	</div>
	<!-- main content -->
</div>
<jsp:include page="footer.jsp" />